package com.bkd.dreams.client.volunteer;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.bkd.dreams.client.event.VolunteerEvent;

public class VolunteerDTO implements Serializable {

	private String key;
	private String name;
	private String phoneNumber;
	private String email;
	private String userId;
	private boolean administrator;
	private List<String> signedUpEvents;
	private Date twinsTraining;
	private Date twinsManagerTraining;
	private Date vikingsTraining;
	private Date vikingsManagerTraining;

	public VolunteerDTO() {
	}
	
	public VolunteerDTO(String name, String phoneNumber, String email, String userId, boolean administrator) {
		this.name = name;
		this.phoneNumber = phoneNumber;
		this.email = email;
		this.userId = userId;
		this.administrator = administrator;
	}
	
	public VolunteerDTO(Volunteer volunteer) {
		this.key = volunteer.getKey();
		this.name = volunteer.getName();
		this.phoneNumber = volunteer.getPhoneNumber();
		this.email = volunteer.getEmail();
		this.userId = volunteer.getUserId();
		this.administrator = volunteer.isAdministrator();
		this.signedUpEvents = new ArrayList<String>(volunteer.getSignedUpEvents());
		this.twinsTraining = volunteer.getTwinsTraining();
		this.twinsManagerTraining = volunteer.getTwinsManagerTraining();
		this.vikingsTraining = volunteer.getVikingsTraining();
		this.vikingsManagerTraining = volunteer.getVikingsManagerTraining();
	}

	public String getKey() {
		return this.key;
	}
	
	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getPhoneNumber() {
		return this.phoneNumber;
	}
	
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	
	public String getEmail() {
		return this.email;
	}
	
	public void setEmail(String email) {
		this.email = email;
	}
	
	public String getUserId() {
		return this.userId;
	}
	
	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Date getTwinsTraining() {
		return this.twinsTraining;
	}
	
	public void setTwinsTraining(Date trainingDate) {
		this.twinsTraining = trainingDate;
	}
	
	public Date getVikingsTraining() {
		return this.vikingsTraining;
	}
	// 877-279-0017 claim # L31147891 need dispatch #
	public void setVikingsTraining(Date trainingDate) {
		this.vikingsTraining = trainingDate;
	}
	
	public Date getTwinsManagerTraining() {
		return this.twinsManagerTraining;
	}
	
	public void setTwinsManagerTraining(Date trainingDate) {
		this.twinsManagerTraining = trainingDate;
	}
	
	public Date getVikingsManagerTraining() {
		return this.vikingsManagerTraining;
	}
	
	public void setVikingsManagerTraining(Date trainingDate) {
		this.vikingsManagerTraining = trainingDate;
	}

	public boolean isAdministrator() {
		return this.administrator;
	}
	
	public void setAdministrator(boolean administrator) {
		this.administrator = administrator;
	}
	
	public List<String> getSignedUpEvents() {
		return this.signedUpEvents;
	}
	
	public void setSignedUpEvents(List<String> signedUpEvents) {
		this.signedUpEvents = signedUpEvents;
	}
	
	public void addEvent(VolunteerEvent event) {
		if(this.signedUpEvents == null) {
			this.signedUpEvents = new ArrayList<String>();
		}
		this.signedUpEvents.add(event.getKey());
	}
}
